package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.goods.GoodsCatPropBO;
import com.ymk.service.IGoodsCatPropService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 商品分类-属性表 服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-05-13
 */
@Service
public class GoodsCatPropService implements IGoodsCatPropService {

    @Override
    public GoodsCatPropBO get(Map param) {
    return this.daoRouter.queryForObject("GoodsCatProp.loadGoodsCatProp",param);
    }

    @Override
    public List<GoodsCatPropBO> list(Map param) {
        return this.daoRouter.query("GoodsCatProp.loadGoodsCatProp",param);
    }

    @Override
    public List<GoodsCatPropBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("GoodsCatProp.loadGoodsCatPropForPage",pagination);
    }

    @Override
    public void post(GoodsCatPropBO param) {
        this.daoRouter.insert("AGoodsCatProp.insertGoodsCatProp",param);
    }

    @Override
    public void update(GoodsCatPropBO param) {
        this.daoRouter.update("AGoodsCatProp.updateGoodsCatProp",param);
    }

    @Override
    public void del(GoodsCatPropBO param) {
        this.daoRouter.update("AGoodsCatProp.delGoodsCatProp",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
